const koa = require("koa")
const router = require("koa-router")()
const render = require('koa-art-template')
const path = require("path")
const app = new koa()
router.get("/index",async ctx=>{
    ctx.set("Access-Control-Allow-Origin","*")
    ctx.render("index")
})
render(app,{
    root:path.join(process.cwd(),'pages'),
    extname:'.html',
    debug:process.env.NODE_ENV !== 'production'
})
app.use(router.routes())
app.listen(3300)